

/**
 * 实现一个打印 斐波那契数列(Fibonacci Sequence)的函数
*/

#include <iostream>

using namespace std;

int FibonacciSequence(int num)
{
    if (num <= 2)
        return 1;

    return FibonacciSequence(num - 1) + FibonacciSequence(num - 2);
}

int main()
{
    int num;
    cout << "Please input num: ";
    cin >> num;

    for(int i = 1; i <= num; ++i){
         cout << FibonacciSequence(i) << " ";
    }

    cout << endl;
   

    return 0;
}